
<h1 id="header">
	<a href="<?php echo HTTP_SERVER; ?>" title="SA Blog Awards">
		<img src="<?php echo HTTP_SERVER.IMG_DIR; ?>header-logo.gif" alt="SA Blog Awards" />
	</a>
</h1>
<div id='top-section'>
	<div id='top-left'>
		<ul>
			<li><b><a href='http://sablogawards.typepad.com/2005_south_african_blog_a/' title='coming soon'>2005</a></b></li>
			<li><b><a href='http://sablogawards.typepad.com/' title='coming soon'>2006</a></b></li>
			<li><b><a href='<?php HTTP_SERVER; ?>' title='coming soon'>2007</a></b></li>
			<li><b><a href="<?php echo HTTP_SERVER; ?>contact" title="contact us">Contact SA Blog Awards</a></b></li>
		</ul>
	</div>
<?php if(NOMINATION_PHASE) { ?>
	<div id='top-right'>
		<b>Got a Blog? <a href='javascript:void(0);' id='getwidgetlink' class='funcOpenWidgetBox' title='ask your readers to nominate you'>Get a Widget.</a></b>
		<div id='widgetbox' class='hideme widgetbox'>
			<form name='frmwidget' id='widgetform' class='funcWidgetForm' action='<?php echo $rewrite; ?>' method='post'>			
				<p><label for='blogurl'><b>Your Blog Url: </b></label><br />
				http://<input type='text' name='blogurl' id='blogurl' class='required validate-url' size='28' value='<?php echo $_SESSION['widget-blogurl']; ?>' /><br />
				<label for='blogcategory'><b>Categories: </b></label><br />
				<small>Hold the Ctrl key to select multiple categories</small><br />
				<select name='blogcategory[]' id='blogcategory' size='4' multiple='multiple' class='required validate-selection' style='width:200px;'>
				<?php
					$widgcats = explode(',', $_SESSION['widget-categories']);
					if($db->Query("SELECT * FROM category;")) {
						while($db->getRow()) {
							echo "<option value='".$db->access['id']."'"; if(in_array($db->access['id'], $widgcats)) echo " selected='selected'"; echo ">".$db->access['name']."</option>";
						}
					}
				?>
				</select></p>
				<p>
					<input type='submit' name='submit' id='submit' class='button' value='Get Widget' /> 
					<span id='widget-loading'></span>
					<b><a href='http://www.rafiq.za.net/blog/2007/02/12/howto-create-use-2007-sa-blog-awards-widget/' target='_blank' title='how does this work?'>help?</a></b>
				</p>
				<div id='yourwidget'><?php echo $blogurl; ?></div>
				<br />
			</form>
		</div>
	</div>
<?php } ?>
<?php if(VOTING_PHASE) { ?>
	<div id='top-right'>
		<b>Are you a finalist? <a href='javascript:void(0);' id='getwidgetlink' class='funcOpenWidgetBox' title='Ask your readers to vote for you'>Get a Vote for me Widget.</a></b>
		<div id='widgetbox' class='hideme widgetbox' style='width:300px;'>
			<p><b>NB: </b>If your blog is listed as a finilist below, you can get a <b>vote for me widget</b> to put on your blog. To do this please <a href='http://2007.sablogawards.com/contact' title='Contact Us'>contact us</a> and we'll email you back with the proper code to put in your blog. Thanks.</p>
		</div>
	</div>
<?php } ?>
</div>
<?php
	if(isset($_SESSION['loggedin'])) {
		echo "<ul class='sitemenu'>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."profile'>My Details</a></li>";
	if($_SESSION['access']=='0') { //administrator level access links
			echo "<li><a href='".HTTP_SERVER.ADMIN_DIR."categories'>Manage Awards Categories</a></li>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."contestants'>Manage Blog Contestants</a></li>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."members'>Manage Panel Judges</a></li>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."member_votes'>Who's voted for who</a></li>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."standings'>View Awards Standings</a></li>";
	}
		echo "	<li><a href='".HTTP_SERVER.ADMIN_DIR."nominations/group'>Grouped Nominations & Votes</a>
							<ul>
								<li><a href='".HTTP_SERVER.ADMIN_DIR."nominations/individual'>Individual Nominations</a></li>
								<li><a href='".HTTP_SERVER.ADMIN_DIR."nominations/votes'>Individual Votes</a></li>
							</ul>
						</li>
						<li><a href='".HTTP_SERVER.ADMIN_DIR."logout'>Logout</a></li>
				</ul>";
	}
?>